using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace KeyCore.Domain.Model
{
    public class AdresTyp
    {
        public AdresTyp()
        {
            Adres = new HashSet<Adres>();
        }

        public int AdresTypId { get; set; }
        public string AdresTypNazwa { get; set; }
        public virtual ICollection<Adres> Adres { get; set; }
    }

    public class AdresTypConfiguration : EntityTypeConfiguration<AdresTyp>
    {
        public AdresTypConfiguration()
        {
            HasKey(k => k.AdresTypId)
                .Property(p => p.AdresTypId)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
        }
    }
}